package com.samphanie.auiu.pub_mod.model

import android.os.Parcelable
import kotlinx.parcelize.Parcelize
import java.io.Serializable

/**
 * @author Dries
 **/
data class GoodsList(
    val totalCount: Int,
    val list: List<GoodsModel>
) : Serializable

@Parcelize
data class GoodsModel(
    val id: String,
    val cateId: String,
    val marketPrice: String,
    val groupPrice: String,
    val hot: Boolean,
    val completedNumText: String,
    val goodsName: String,
    val tags: String,
    val joinedAvatars: List<String>?,
    val sliderImage: String,
    val sliderImages: List<SliderImage>?,
    val createTime: String
) : Serializable, Parcelable

fun selectPrice(marketPrice: String?, groupPrice: String?): String {
    if (!marketPrice.isNullOrBlank()) return marketPrice
    if (!groupPrice.isNullOrBlank()) return "￥$groupPrice"
    return ""
}